﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Lin_shop.Services
{
    public interface ICarService
    {
        /// <summary>
        /// 加入购物车方法
        /// </summary>
        /// <param name="goodId"></param>
        /// <returns></returns>
        bool AddCar(int goodId, int userId);
        /// <summary>
        /// 更新购物车数量
        /// </summary>
        /// <returns></returns>
        bool UpdateCar(Car car, int count);
        /// <summary>
        /// 删除购物车
        /// </summary>
        /// <param name="car"></param>
        /// <returns></returns>
        bool DeleteCar(Car car);
        /// <summary>
        /// 根据用户Id和商品Id获取购物车对象
        /// </summary>
        /// <returns></returns>
        Car GetCarByUId(int goodId, int uId);
    }
}
